$("#gameStart").click(function () {
  $("#start").css("display", "none");
  $("#choose").css("display", "flex");
});

$("#isAi").click(function () {
  window.location.href = "../game/ai_vs_player.html";
});

$("#notAi").click(function () {
  window.location.href = "../game/player_vs_player.html";
});

$("#aboutUs").click(function () {
  window.location.href = "../game/aboutUs.html";
});

$("#back").click(function () {
  $("#choose").css("display", "none");
  $("#start").css("display", "block");
  window.location.href = "../game/index.html";
});


// index.js 脚本
$(document).ready(function () {
  const urlParams = new URLSearchParams(window.location.search);
  if (urlParams.get("show") === "choose") {
    $("#start").css("display", "none");
    $("#choose").css("display", "flex");
  } else {
    $("#start").css("display", "block");
    $("#choose").css("display", "none");
  }
});
